class FrictionArea{
  PVector startCoordinate;
  int areaLength;
  String state;
  color col;
  
  FrictionArea(int areaLength, color col){
    startCoordinate = new PVector(width / 2, height - 5);
    this.areaLength = areaLength;
    state = "No Friction";
    this.col = col;
  }
  
  // Draw friction area
  void display(){
    stroke(col);
    fill(col);
    textAlign(CENTER);
    text(state, startCoordinate.x + (areaLength / 2), startCoordinate.y - 10);
    rect(startCoordinate.x, startCoordinate.y, areaLength, 5);
  }
  
  // Change the state (surface) of the friction area
  void changeState(String state){
    this.state = state;
  }
}
